package cn.edu.nwsuaf.teachercenter.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.edu.nwsuaf.teachercenter.pojo.CourceEmployee;
import cn.edu.nwsuaf.teachercenter.service.CourceEmployeeService;

@Controller
@RequestMapping(value="/courceEmployee")
public class CourceEmployeeController {
	@Resource(name="courceEmployeeService")
	private CourceEmployeeService courceEmployeeService;
	
	@ResponseBody
	@RequestMapping(value="/myClass/{teacherNo}")
	public List<CourceEmployee> searchSclass(@PathVariable("teacherNo")String teacherNo){
		return courceEmployeeService.searchCourceEmployee(teacherNo);
	}
	
	@ResponseBody
	@RequestMapping(value="/json/searchMyCource/{teacherNo}")
	public List<CourceEmployee> searchCource(@PathVariable("teacherNo")String teacherNo){
		return courceEmployeeService.loadMyCource(teacherNo);
	}
}
